package com.mars.module.admin.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 房屋信息对象 sys_house
 *
 * @author mars
 * @date 2024-01-23
 */

@Data
@ApiModel(value = "房屋信息对象")
@Builder
@Accessors(chain = true)
@TableName("sys_house")
public class SysHouse{

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 房屋名称
     */
    @Excel(name = "房屋名称")
    @ApiModelProperty(value = "房屋名称")
    private String houseName;
    /**
     * 面积
     */
    @Excel(name = "面积")
    @ApiModelProperty(value = "面积")
    private String area;
    /**
     * 价格
     */
    @Excel(name = "价格")
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
    /**
     * 地址
     */
    @Excel(name = "地址")
    @ApiModelProperty(value = "地址")
    private String address;
    /**
     * 房屋状态
     */
    @Excel(name = "房屋状态")
    @ApiModelProperty(value = "房屋状态")
    private String status;


    /**
     * 图片地址
     */
    @Excel(name = "图片地址")
    @ApiModelProperty(value = "图片地址")
    private String picture;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

}
